From ad0314b173ecc40020926e6a0c7e130a30e26c0f Mon Sep 17 00:00:00 2001 From: robertlipe Date: Fri, 13 Feb 2015 16:37:22 +0000 Subject: [PATCH] Try to improve handling of 230400kbit/sec in Windows serial system. --- gpsbabel/gbser_win.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gpsbabel/gbser_win.cc b/gpsbabel/gbser_win.cc index 4ea910f90..5fea51d1f 100644 --- a/gpsbabel/gbser_win.cc +++ b/gpsbabel/gbser_win.cc @@ -67,6 +67,18 @@ DWORD mkspeed(unsigned br) return CBR_57600; case 115200: return CBR_115200; + case 230400: + // Per https://msdn.microsoft.com/en-us/library/windows/desktop/aa363214 + // "This member can be an actual baud rate value, or one of the + // following indexes." + // They provide a CBR_25600, which would be programmable on a 16450 only + // with a bizarre oscillator crystal, but don't provide a 230400, such + // as is used as the default in skytraq. +#if defined CBR_230400 + return CBR_230400; +#else + return 230400 +#endif default: fatal("Unsupported serial speed: %d\n", br); return 0; /* keep compiler happy */ -- 2.30.2